﻿<Window x:Class="MiladiShamsi.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="شمسي-ميلادي" Height="320" Width="300" Background="AliceBlue" Icon="Calendar.ico" ShowInTaskbar="True" WindowStartupLocation="CenterScreen" Loaded="Window_Loaded">
    <Grid Margin="5">
        <TabControl TabStripPlacement="Top" FlowDirection="RightToLeft">
            <TabItem Name="TabItemMiladi">
                <TabItem.Header>
                    <Label FontFamily="Tahoma" FontWeight="Bold">ميلادي به شمسي</Label>
                </TabItem.Header>
                <TabItem.Content>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.5*"/>
                            <RowDefinition Height="0.5*"/>
                        </Grid.RowDefinitions>
                        
                        <StackPanel Grid.Row="0">
                            <StackPanel Orientation="Horizontal" Margin="5">
                                <TextBlock Width="50" FontWeight="Bold" FontFamily="Tahoma">سال :</TextBlock>
                                <TextBox Width="100" Margin="10,0,10,0" Name="TextBoxYearMiladi"></TextBox>
                                <TextBlock Foreground="Gray">مثال : 1985</TextBlock>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="5">
                                <TextBlock Width="50" FontWeight="Bold" FontFamily="Tahoma">ماه :</TextBlock>
                                <ComboBox Width="200" Margin="10,0,10,0" Name="ComboBoxMonthMiladi" IsReadOnly="False" IsEditable="False">
                                    <ComboBoxItem>1</ComboBoxItem>
                                    <ComboBoxItem>2</ComboBoxItem>
                                    <ComboBoxItem>3</ComboBoxItem>
                                    <ComboBoxItem>4</ComboBoxItem>
                                    <ComboBoxItem>5</ComboBoxItem>
                                    <ComboBoxItem>6</ComboBoxItem>
                                    <ComboBoxItem>7</ComboBoxItem>
                                    <ComboBoxItem>8</ComboBoxItem>
                                    <ComboBoxItem>9</ComboBoxItem>
                                    <ComboBoxItem>10</ComboBoxItem>
                                    <ComboBoxItem>11</ComboBoxItem>
                                    <ComboBoxItem>12</ComboBoxItem>
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="5">
                                <TextBlock Width="50" FontWeight="Bold" FontFamily="Tahoma">روز :</TextBlock>
                                <ComboBox Width="200"  Margin="10,0,10,0" Name="ComboBoxDayMiladi" IsEditable="False">
                                    <ComboBoxItem>1</ComboBoxItem>
                                    <ComboBoxItem>2</ComboBoxItem>
                                    <ComboBoxItem>3</ComboBoxItem>
                                    <ComboBoxItem>4</ComboBoxItem>
                                    <ComboBoxItem>5</ComboBoxItem>
                                    <ComboBoxItem>6</ComboBoxItem>
                                    <ComboBoxItem>7</ComboBoxItem>
                                    <ComboBoxItem>8</ComboBoxItem>
                                    <ComboBoxItem>9</ComboBoxItem>
                                    <ComboBoxItem>10</ComboBoxItem>
                                    <ComboBoxItem>11</ComboBoxItem>
                                    <ComboBoxItem>12</ComboBoxItem>
                                    <ComboBoxItem>13</ComboBoxItem>
                                    <ComboBoxItem>14</ComboBoxItem>
                                    <ComboBoxItem>15</ComboBoxItem>
                                    <ComboBoxItem>16</ComboBoxItem>
                                    <ComboBoxItem>17</ComboBoxItem>
                                    <ComboBoxItem>18</ComboBoxItem>
                                    <ComboBoxItem>19</ComboBoxItem>
                                    <ComboBoxItem>20</ComboBoxItem>
                                    <ComboBoxItem>21</ComboBoxItem>
                                    <ComboBoxItem>22</ComboBoxItem>
                                    <ComboBoxItem>23</ComboBoxItem>
                                    <ComboBoxItem>24</ComboBoxItem>
                                    <ComboBoxItem>25</ComboBoxItem>
                                    <ComboBoxItem>26</ComboBoxItem>
                                    <ComboBoxItem>27</ComboBoxItem>
                                    <ComboBoxItem>28</ComboBoxItem>
                                    <ComboBoxItem>29</ComboBoxItem>
                                    <ComboBoxItem>30</ComboBoxItem>
                                    <ComboBoxItem>31</ComboBoxItem>
                                </ComboBox>
                            </StackPanel>
                            
                            <Button Name="ButtonConvertToShamsi" Click="ButtonConvertToShamsi_Click">تبديل به شمسي</Button>
                            
                        </StackPanel>
                        <GridSplitter Grid.Row="1" Background="Gray" ShowsPreview="True" BorderBrush="Gray" BorderThickness="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" />
                        <StackPanel Grid.Row="1" Background="#7FDCDCDC">
                            <StackPanel Margin="5" Orientation="Horizontal">
                                <TextBlock FontFamily="Tahoma" FontWeight="Bold">سال :</TextBlock>
                                <TextBlock Name="TextBoxYearShamsiConverted"></TextBlock>
                            </StackPanel>
                            <StackPanel Margin="5" Orientation="Horizontal">
                                <TextBlock FontFamily="Tahoma" FontWeight="Bold">ماه :</TextBlock>
                                <TextBlock Name="TextBoxMonthShamsiConverted"></TextBlock>
                            </StackPanel>
                            <StackPanel Margin="5" Orientation="Horizontal">
                                <TextBlock FontFamily="Tahoma" FontWeight="Bold">روز در ماه:</TextBlock>
                                <TextBlock Name="TextBoxDayInMonthShamsiConverted"></TextBlock>
                            </StackPanel>
                            <StackPanel Margin="5" Orientation="Horizontal">
                                <TextBlock FontFamily="Tahoma" FontWeight="Bold">روز در هفته:</TextBlock>
                                <TextBlock Name="TextBoxDayInWeekShamsiConverted"></TextBlock>
                            </StackPanel>
                            
                        </StackPanel>
                    </Grid>
                </TabItem.Content>
            </TabItem>
            
            <TabItem Name="TabItemShamsi">
                <TabItem.Header>
                    <Label FontFamily="Tahoma" FontWeight="Bold">شمسي به ميلادي</Label>
                </TabItem.Header>
                <TabItem.Content>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.5*"/>
                            <RowDefinition Height="0.5*"/>
                        </Grid.RowDefinitions>

                        <StackPanel Grid.Row="0">
                            <StackPanel Orientation="Horizontal" Margin="5">
                                <TextBlock Width="50" FontWeight="Bold" FontFamily="Tahoma">سال :</TextBlock>
                                <TextBox Width="100" Margin="10,0,10,0" Name="TextBoxYearShamsi"></TextBox>
                                <TextBlock Foreground="Gray">مثال : 1364</TextBlock>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="5">
                                <TextBlock Width="50" FontWeight="Bold" FontFamily="Tahoma">ماه :</TextBlock>
                                <ComboBox Width="200" Margin="10,0,10,0" Name="ComboBoxMonthShamsi">
                                    <ComboBoxItem>1</ComboBoxItem>
                                    <ComboBoxItem>2</ComboBoxItem>
                                    <ComboBoxItem>3</ComboBoxItem>
                                    <ComboBoxItem>4</ComboBoxItem>
                                    <ComboBoxItem>5</ComboBoxItem>
                                    <ComboBoxItem>6</ComboBoxItem>
                                    <ComboBoxItem>7</ComboBoxItem>
                                    <ComboBoxItem>8</ComboBoxItem>
                                    <ComboBoxItem>9</ComboBoxItem>
                                    <ComboBoxItem>10</ComboBoxItem>
                                    <ComboBoxItem>11</ComboBoxItem>
                                    <ComboBoxItem>12</ComboBoxItem>
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="5">
                                <TextBlock Width="50" FontWeight="Bold" FontFamily="Tahoma">روز :</TextBlock>
                                <ComboBox Width="200" Margin="10,0,10,0" Name="ComboBoxDayShamsi">
                                    <ComboBoxItem>1</ComboBoxItem>
                                    <ComboBoxItem>2</ComboBoxItem>
                                    <ComboBoxItem>3</ComboBoxItem>
                                    <ComboBoxItem>4</ComboBoxItem>
                                    <ComboBoxItem>5</ComboBoxItem>
                                    <ComboBoxItem>6</ComboBoxItem>
                                    <ComboBoxItem>7</ComboBoxItem>
                                    <ComboBoxItem>8</ComboBoxItem>
                                    <ComboBoxItem>9</ComboBoxItem>
                                    <ComboBoxItem>10</ComboBoxItem>
                                    <ComboBoxItem>11</ComboBoxItem>
                                    <ComboBoxItem>12</ComboBoxItem>
                                    <ComboBoxItem>13</ComboBoxItem>
                                    <ComboBoxItem>14</ComboBoxItem>
                                    <ComboBoxItem>15</ComboBoxItem>
                                    <ComboBoxItem>16</ComboBoxItem>
                                    <ComboBoxItem>17</ComboBoxItem>
                                    <ComboBoxItem>18</ComboBoxItem>
                                    <ComboBoxItem>19</ComboBoxItem>
                                    <ComboBoxItem>20</ComboBoxItem>
                                    <ComboBoxItem>21</ComboBoxItem>
                                    <ComboBoxItem>22</ComboBoxItem>
                                    <ComboBoxItem>23</ComboBoxItem>
                                    <ComboBoxItem>24</ComboBoxItem>
                                    <ComboBoxItem>25</ComboBoxItem>
                                    <ComboBoxItem>26</ComboBoxItem>
                                    <ComboBoxItem>27</ComboBoxItem>
                                    <ComboBoxItem>28</ComboBoxItem>
                                    <ComboBoxItem>29</ComboBoxItem>
                                    <ComboBoxItem>30</ComboBoxItem>
                                    <ComboBoxItem>31</ComboBoxItem>
                                </ComboBox>
                            </StackPanel>
                            
                            <Button Name="ConvertToMiladi" Click="ConvertToMiladi_Click">تبديل به ميلادي</Button>
                            
                        </StackPanel>
                        <GridSplitter Grid.Row="1" Background="Gray" ShowsPreview="True" BorderBrush="Gray" BorderThickness="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" />
                        <StackPanel Grid.Row="1" Background="#7FDCDCDC">
                            <StackPanel Margin="5" Orientation="Horizontal">
                                <TextBlock FontFamily="Tahoma" FontWeight="Bold">سال :</TextBlock>
                                <TextBlock Name="TextBoxYearMiladiConverted"></TextBlock>
                            </StackPanel>
                            <StackPanel Margin="5" Orientation="Horizontal">
                                <TextBlock FontFamily="Tahoma" FontWeight="Bold">ماه :</TextBlock>
                                <TextBlock Name="TextBoxMonthMiladiConverted"></TextBlock>
                            </StackPanel>
                            <StackPanel Margin="5" Orientation="Horizontal">
                                <TextBlock FontFamily="Tahoma" FontWeight="Bold">روز در ماه:</TextBlock>
                                <TextBlock Name="TextBoxDayInMonthMiladiConverted"></TextBlock>
                            </StackPanel>
                            <StackPanel Margin="5" Orientation="Horizontal">
                                <TextBlock FontFamily="Tahoma" FontWeight="Bold">روز در هفته:</TextBlock>
                                <TextBlock Name="TextBoxDayInWeekMiladiConverted"></TextBlock>
                            </StackPanel>

                        </StackPanel>
                    </Grid>
                </TabItem.Content>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
